package com.LachesismStorm.lachesism.member.mapper;

import com.LachesismStorm.lachesism.member.vo.*;
import com.LachesismStorm.lachesism.member.vo.dto.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: lachesism
 * @Date: 2023/04/09/11:57
 * @Description:
 */
public interface LuntaiMapper {

    void addCarInfo(LuntaiUserCar car);

    void addTyreInfo(LuntaiUserTyre tyre);

    List<UserCarsDto> getCarsByUserId(Integer userId);

    void updateCar(LuntaiUserCar car);

    void updateTyreInfo(LuntaiUserTyre tyre);

    List<LuntaiUserTyre> getTyreInfoByCarId(Integer carId,Integer position);

    List<LuntaiTyre> getTyreBrand();

    void policyExtensionRequest(LuntaiPolicyExtensionRequest request);

    void editPolicyExtensionRequest(LuntaiPolicyExtensionRequest request);

    List<PolicyExtensionRequestDto> getPolicyExtensionRequestList(Integer userId,Integer status);

    void createOrder(LuntaiOrder luntaiOrder);

    LuntaiPolicyExtensionRequest getPolicyExtensionRequestInfo(Integer requestId);

    LuntaiOrder getPolicyExtensionOrderInfo(Integer sourceId,Integer requestId);

    LuntaiTyre getTyreByCarId(Integer carId);

    LuntaiStore getStoreByStoreId(Integer storeId);
    
    void batchAddRequestTyre(List<LuntaiRequestTyre> tyreList);

    List<LuntaiUserTyre> getRequestTyreListByRequestId(Integer id);

    LuntaiUserCar getCarById(Integer carId);

    List<LuntaiStore> getStoreList(LuntaiStore store);

    List<String> getAllProvince();

    List<String> getAllCity(String province);

    List<LuntaiMessage> getMessageList(Integer userId);

    void editMessage(LuntaiMessage message);

    List<LuntaiIntroduce> getAllIntroduce();

    List<LuntaiCoupons> getCoupons(Integer userId);

    List<LuntaiNews> getNews();

    void addViewCount(Integer newsId);

    LuntaiNews getNewsById(Integer newsId);

    void rescueApplication(LuntaiRescueApplication application);

    void editRescueApplication(LuntaiRescueApplication application);

    List<LuntaiRescueApplicationDto> getRescueApplicationList(Integer userId, Integer status);

    LuntaiRescueApplication getRescueApplicationInfoById(Integer applicationId);

    List<CarsListDto> getCarSummarizeInformation(UserCarsDto dto);

    void storeApplication(LuntaiStoreApplication application);

    List<LuntaiStoreApplication> getStoreApplicationList(Integer userId);

    List<LuntaiRescueType> getRescueTypeList();

    List<LuntaiUserTyre> getTyreListByCarId(Integer carId);

    List<LuntaiUserTyre> getTyreInfoByCarId2(Integer carId);

    List<SysArea> getAreaList();

    int checkIsApplyStore(Integer userId);

    List<LuntaiStoreApplication> getStoreApplyResult(Integer userId);

    List<LuntaiStore> getStoreByLocation(LuntaiStore luntaiStore);

    void updateLuntaiStoreApplication(LuntaiStoreApplication luntaiStoreApplication);

    LuntaiStoreApplication selectLuntaiStoreApplicationById(Integer id);

    LuntaiUser selectLuntaiUserById(Integer userId);

    void updateLuntaiUser(LuntaiUser luntaiUser);

    SysUser selectUserByUserName(String username);

    void insertUser(SysUser sysUser);

    void insertLuntaiStore(LuntaiStore luntaiStore);

    void insertLuntaiMessage(LuntaiMessage luntaiMessage);

    void addTyreInstallRequest(LuntaiTyreInstallRequest request);

    void addTyreInstallRequestTyres(@Param("tyres") List<LuntaiTyreInstallLog> tyres);

    List<String> checkCodeEx(@Param("codes") List<String> codes);

    List<TyreInstallLogDto> getTyreListByCarId2(Integer carId);

    List<Integer> getNotInstallId();

    List<InstallRequestDto> getInstallRequests(@Param("ids") List<Integer> notInstallId);

    UserCarsDto getCarInfoById(Integer carId);

    List<TyreInstallListDto> getTyreInstallRequest(Integer userId, Integer status,String licensePlate);

    void editTyreInstallRequest(LuntaiTyreInstallRequest request);

    List<LuntaiTyreInstallLog> getTyreListByRequestId(Integer id);

    List<TyreInstallListDto> getRequestListByStoreId(Integer storeId,Integer status);

    void claimApplication(LuntaiClaimsRequest request);

    Integer getTyreInstallInfo(Integer tyreId);

    List<ClaimRequestDto> getClaimApplicationList(ClaimRequestDto request);

    LuntaiTyreInstallLog getTyreById(Integer tyreId);

    void updateClaimsApplication(LuntaiClaimsRequest request);

    SysUser getAdminInfo(String phone);

    void updateClaimOrder(Integer claimId, Integer status,Integer adminId);

    void replaceTryeByClaims(LuntaiTyreInstallLog tyre);

    void cancelOldTyre(Integer tyreId);

    LuntaiClaimsRequest getClaimRequest(Integer requestId);

    LuntaiTyreInstallLog getAfterTyreInfo(String code);

    String getOrderSn(Integer requestId,Integer type);

    LuntaiTyreInstallRequest getInstallTyreRequestByTyreId(Integer id);

    LuntaiTyreInstallRequest getTyreInstallRequestInfo(Integer requestId);

    LuntaiStoreAdminDto getStoreInfoByAdmin(Integer adminId);

    LuntaiStoreAdminDto getAdminTitleFourCount(Integer id);

    Integer getNotInstallCount(Integer id);

    Integer getInstallTyreCountByStoreId(Integer id);

    Integer getHelpCountByStoreId(Integer id);

    Integer getReplaceCountByStoreId(Integer id);

    Integer checkCodeEx2(String code);

    List<LuntaiStoreApplication> getStoreListByAdmin(LuntaiStoreApplication application);

    LuntaiStoreApplicationDto getStoreApplicationById(Integer applicationId);

    LuntaiTyre getTyreBrandById(Integer tyreBrandId);

    List<LuntaiExampleImage> getExampleImg(Integer type);

    Integer getAuditStatus(Integer type);

    Integer selectExistCar(String licensePlate);

    void finishOrder(Integer id);

    void finishInstallRequest(Integer requestId);

    void deleteAdmin(String phone);

    void deleteStore(String phone);

    void deleteStoreApplication(String phone);

    void recoverRole(String phone);

    Integer getExistOrder(String phone);

    void updateMenu(SysMenu menu);

    List<LuntaiUser> getSuperAdmin();

    Integer getDistance();

    List<TyreInstallListDto> getRequestListByStoreId2(Integer status);

    void deleteTyreInstallRequestLog(Integer requestId);

    void deleteDeleteOrder(Integer id);

    void saveVideoUploadLog(String fileName, Integer userId, String memberPhone);

    Integer getStoreApplicationByPhone(String phone);

    List<LuntaiUserCar> getCarListByLicensePlate();

    void addAuditLog(AuditLog log);

    LuntaiClaimsRequest getClaimRequestByTyreId(Integer tyreId);

    List<TyreInstallListDto> getInstallRequestListByLicensePlate(Integer status, String licensePlate);


    Integer getStoreApplicationCount();

    Integer getUnAuditCount();

    Integer getRefuseCount();

    Integer getSuccessCount();

    Integer getClaimApplicationCount();

    Integer getClaimUnAuditCount();

    Integer getClaimRefuseCount();

    Integer getClaimSuccessCount();

    Integer getClaimTodo();

    Integer getUnAuditStoreCount();

    Integer getUnAuditClaimCount();

    Integer getTyreInstallCount();

    Integer getClaimApplicationCountOnUser(Integer userId);

    Integer getClaimUnAuditCountOnUser(Integer userId);

    Integer getClaimRefuseCountOnUser(Integer userId);

    Integer getClaimSuccessCountOnUser(Integer userId);

    Integer getClaimTodoOnUser(Integer userId);
}
